package com.jishulianmeng.dao;

import java.io.Serializable;
import java.util.List;
//瀹氫箟鍩烘湰鎿嶄綔鐨勬帴鍙�
public interface IGenericDao<T, PK extends Serializable> {
	
	public void save(T entity);
	public void del(java.io.Serializable id);
	public void del(T entity);
	public void update(T entity);
	public List<T> searchAll();
	public List<T> search(T condition);
	public List<T> search(final T condition,final boolean isExact);
	public List<T> search(String hql);
	public List<T> search(String hql,String[] paramName,Object[] values);
	public List<T> search(String hql,String paramName,Serializable key);
	public T getById(Serializable key);
	public List<T> getByid(Serializable id);
	public Integer select(String hql);
	public List<T> searchPage(String hql,int from,int max);
	public List selectBySql(String sql, int from, int max);
	public Integer getTotalNum(String hql);
	public List<T> searchPage(String hql);
	public void add(T entity);
	public Object executeMySQL(final String sql);
	
	public List searchBySql(String sql);
	//public void addBatch(List<T> entitys);
}